<template>
  <div class="liegoodlist">
    <div class="title">
      {{title}}
    </div>
    <div class="cover">
      <div class="good" v-for='item in goods'>
        <div @click="goInfo(item.id)" class="items">
          <div class="img">
            <img :src="item.img">
          </div>
          <div class="name">{{item.name}}</div>
          <div class="prize">￥{{item.prize}}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "goodslist",
    props: {
      title: String,
      goods:Array,
    },
    methods:{
      goInfo(v){
        console.log(v)
      this.$router.push({path: '/category/uid?='+v})
      }
    }
  }
</script>

<style lang="less" scoped>
  .img{
    width: 165px;
    height: 140px;
    overflow: hidden;
    background-color: @_grey;
    line-height: 140px;
  }
  .img img{
    width: 100%;
    height: auto;

  }
  .cover{
    height: auto;
    overflow: hidden;
    background-color: #fff;
    margin-bottom: 60px;
    padding-left: 7px;
    box-sizing: border-box;
  }
  .liegoodlist {
    background-color: #fff;
    width: 100%;
    clear: both;
    padding-top: 12px;
    height: AUTO;
  }
.items{
  margin-bottom: 5px;
}

  .liegoodlist .title {
    height: 18px;
    line-height: 18px;
    color: @_blk;
    font-size: 18px;
    border-left: 3px solid @_green;
    margin-bottom: 12px;
    position: relative;
  }
  .lie_goods_f{
    padding-left: 5px;
    padding-right: 5px;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
  }
  .good{
    float: left;
    width: 170px;
    margin: 0 5px;
  }
  .name{
    text-align: center;
    line-height: 22px;
    margin: 10px 0;
  }
  .title div{
    float: right;
    height: 20px;
    width: 20px;
    margin-right: 5px;
  }
  .prize{
    color: @_red;
    text-align: center;
  }

</style>
